package com.uk.data.containers;

import java.io.Serializable;
import java.util.Collection;

import com.uk.data.ejbs.IFaturaBean;
import com.uk.data.entities.User;
import com.vaadin.data.util.BeanItemContainer;

public class UserContainer extends BeanItemContainer<User> implements Serializable{

	public static final Object[] NATURAL_COL_ORDER = new Object[]{"username", "name","surname","startDate","endDate", "locked"};
	
	public static final Object[] COL_ORDER_FOR_FORM = new Object[]{"username","password", "name","surname","startDate","endDate", "locked"};
	
	public static final String[] COL_HEADERS_ALBANIAN = new String[]{"Perdoruesi", "Emri","Mbiemri","Fillimi", "Perfundimi","E kycur?"};
	public UserContainer(Collection<? extends User> collection)
			throws IllegalArgumentException {
		super(User.class, collection);
		// TODO Auto-generated constructor stub
	}

	public static UserContainer createFromEjb(IFaturaBean faturaBean){
		UserContainer userContainer = new UserContainer(faturaBean.queryUsers());
		return userContainer;
	}

}
